﻿using RantAIOCR.Common;
using System.Windows;
using System.Windows.Input;
using Window = System.Windows.Window;

namespace RantLEDOCR
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public int width1 = 450;
        public int width2 = 1300;
        public int threshold1 = 200;
        public int threshold2 = 220;
        public int delta1 = 0;
        public int delta2 = 0;
        public MainWindow()
        {
            InitializeComponent();
            width1 =int.Parse( AppConfigurtaionServices.Configuration["Paramters:0:width"]);
            width2 = int.Parse(AppConfigurtaionServices.Configuration["Paramters:1:width"]);
            threshold1 = int.Parse(AppConfigurtaionServices.Configuration["Paramters:0:threshold"]);
            threshold2 = int.Parse(AppConfigurtaionServices.Configuration["Paramters:1:threshold"]);

            delta1 = int.Parse(AppConfigurtaionServices.Configuration["Paramters:0:delta"]); 
            delta2 = int.Parse(AppConfigurtaionServices.Configuration["Paramters:1:delta"]);
        }

        private void SC_ChinaAccentControl_CloseClick(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            if (Keyboard.IsKeyDown(Key.I) && Keyboard.IsKeyDown(Key.LeftCtrl))
            {
                Setting win=new Setting();
                win.ShowDialog();
            }
        }
    }
   
}
